public class A {

    private A() {

    }

    private static A a;

    public static A getA() {
        if(a == null) {
            System.out.println("懒汉式单例");
            a = new A();
        }
        return a;
    }
}
